﻿using System;
using System.Collections.Generic;
using Needle.Bus.Configuration;
using Needle.Bus.Engine.Filters;

namespace Needle.Bus.Engine.Factories
{
 
    public class StageFilterFactory : IFactory<IStageFilter>
    {

        public StageFilterFactory(BusConfiguration busConfiguration)
        {
            if (busConfiguration == null)
                throw new ArgumentNullException("busConfiguration", "busConfiguration is null.");

        }

        public virtual IStageFilter Create(string id)
        {
            return new StageFilterBase(id);
        }

        public virtual IList<IStageFilter> CreateAll()
        {
            List<IStageFilter> list = new List<IStageFilter>();
            list.Add(new StageFilterBase(Guid.NewGuid().ToString()));
            return list;
        }

    }
}
